package ru.cod.rs.main.types;

import ru.cod.rs.main.enums.Direction;

public class Speed {
	private Integer value;
	private Direction direction;

	// /////////////////////////////////
	public Speed(Integer val, Direction dir) {
		this.direction = dir;
		this.value = val;
	}

	public Speed(Integer val) {
		this.value = val;
		this.direction = Direction.NONE;
	}

	// /////////////////////////////////

	public Integer getValue() {
		return value * direction.value();
	}

	public void setDirection(Direction dir) {
		this.direction = dir;
	}

	public void setValue(int val) {
		this.value = val;
	}

}
